<!doctype html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
	<meta name="format-detection" content="telephone=no" />
	<title>首页</title>
	<link rel="stylesheet" type="text/css" href="../c/aui.css" />
	<style>
		.sx-money .aui-card-list-footer {
			padding: 0;
		}
		.sx-list .aui-card-list-footer {
			color: #fff;
			border-bottom: 1px solid #060606
		}

		.sx-money {
			/* background: #eba825;*/
			background: url(../i/jinbbg.png) no-repeat;
			background-size: 100% 100%;
			border-radius: 0.75rem;
			margin: 0.75rem;
			/*box-shadow:0px 0px 30px -5px #eba825;*/
			padding: 0.75rem;
			/*margin-top: 0;*/
			padding-bottom: 0rem;
			/*opacity: 0.8*/
		}

		.sx-t .l p {
			font-size: 0.75rem;
			color: #fff;
			letter-spacing: 1.5px;
			padding-bottom: 0.35rem;
		}

		.sx-t .l p span {
			padding-left: 0.5rem;
		}

		.sx-t .l b {
			font-size: 1.8rem;
			color: #fff;
			letter-spacing: 1.5px;
			font-weight: 400
		}

		.sx-t .r {
			background: rgba(0,0,0,0.2);
			color: #fff;
			border-radius: 1rem;
			padding: 0.25rem 0.75rem;
			font-size: 0.85rem;
		}

		.sx-b {
			display: flex;
			padding: 0.75rem 0;
		}

		.sx-b .l {
			width: 50%;
		}

		.sx-b div {
			letter-spacing: 1.5px;
		}

		.sx-b div p {
			padding-bottom: 0.25rem;
			font-size: 0.75rem;
		}

		.sx-b div b {
			font-size: 0.95rem;
			font-weight: normal;
		}

		.sx-footer {
			background: rgba(0,0,0,0.2);
			margin: 0 -0.75rem;
			padding: 0.35rem 0.75rem;
			border-bottom-left-radius: 0.75rem;
			border-bottom-right-radius: 0.75rem;
			font-size: 0.75rem;
			letter-spacing: 1.5px
		}

		.sx-footer b {
			font-weight: normal;
		}
		.aui-card-list
		,.aui-card-list li
		,.aui-card-list ul
		,.aui-list .aui-list-item
		{
			background: none;
			border: 0;
			color: #fff;
		}
		.sx-list{
			border-top: 0.35rem solid #000;
		}
		.aui-list .aui-list-item-text{
			color: #fff;
			font-size: 0.7rem;
		}
		.title{
			font-size: 0.85rem;
		}
		.time{
			opacity: 0.5;
		}
		.sx-list .money{
			position: absolute;
			right: 0.75rem;
			top: 1rem;
			color: #eba825;
		}
	</style>
</head>

<body>
	<div class="aui-content">
		<div class="sx-money">
			<div class="aui-card-list-footer sx-t">
				<div class="l">
					<p>当前金币<span>(约0.00元)</span></p>
					<b>0</b>
				</div>
				<div class="r" tapmode onclick="_url({title:'提现',url:'member_tixian',_right_title:'提现记录',_right_url:'member_tixian_list'})">立即提现</div>
			</div>
			<div class="sx-b">
				<div class="l">
					<p>今日金币</p>
					<b>0</b>
				</div>
				<div class="r">
					<p>昨日金币</p>
					<b>0</b>
				</div>
			</div>
			<div class="sx-footer">
				累计获取金币： <b>0</b>
			</div>
		</div>
		<div class="sx-list">
			<div class="aui-card-list">
				<div class="aui-card-list-content">
					<div class="aui-card-list-footer">
						<div>金币描述</div>
						<div>金币奖励</div>
					</div>
					<script id="sx-list" type="text/x-dot-template">
						{{ for(var i=0,it=it.data; i < it.length; i++) { }}
						<li class="aui-list-item aui-list-item-middle">
							<div class="aui-media-list-item-inner">
								<div class="aui-list-item-inner">
									<div class="aui-list-item-text  title">
										{{= it[i].content }}
									</div>
									<div class="aui-list-item-text time">
										{{= it[i].time }}
									</div>
									<div class="money" {{? it[i].type == 2}}style="color:#9c9c9c"{{?}}>{{= it[i].jinbi_name }}</div>
								</div>
							</div>
						</li>
						{{ } }}
					</script>
					<ul class="aui-list aui-media-list" id="sx-view"><div id="loadingdi_huifu"><img src="../i/footer_progress.png" /></div></ul>
				</div>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript" src="../j/api.js"></script>
<script type="text/javascript" src="../j/jquery-3.3.1.min.js"></script>
<script type="text/javascript">
	apiready = function() {
		info();
		urls();
		url = 'member/jinbi_records';
		_list({url:url,loading:1});
		_shangla(function(ret,err){
			info();
			_list({url:url,loading:1});
		},1)
		// 监听滚动
		api.addEventListener({
			name : 'scrolltobottom',
		}, function(ret, err) {
			if (heigutgao == 1) {
				pagenum += 1
				_list({url:url,page:pagenum});
			}
		});
		// 回到屏幕
		api.addEventListener({
			name: 'viewappear'
		}, function(ret, err) {
			info();
		});
	}
	function info(){
		_ajax('member/jinbi',function(ret,err){
			if(ret){
				$('.sx-t .l p span').text('(约'+ret.money+'元)');
				$('.sx-t .l b').text(_money(ret.jinbi));
				$('.sx-b .l b').text(_money(ret.today));
				$('.sx-b .r b').text(_money(ret.yesterday));
				$('.sx-footer b').text(_money(ret.jinbi_num));
			}else{
				_alert(JSON.stringify(err));
			}
		})
	}

</script>

</html>
